<?PHP
 session_start();
 include("admin/include/db.php");
 include("includes/session.php");
 
 $userId = $_SESSION['user_id'];


?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=TITLE_WEBSITE?></title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<center>
<div style="background:#179cc1; height:3px">&nbsp;</div>
<div style="width:990px;" align="center">
		<div id="header">
		<?php
    		include("includes/header.php");
   		?>
        </div>
    <div style="margin-top:20px; min-height:500px !important">
    	 <div style=" width:25%; float:left" >
        	 <?php include("includes/studentLeftMenu.php");?>
        </div>
        <div style="width:65%; margin-left:40px" >
        	<div align="left" >
            	<span class="headingOrange" ><strong>Lecture Materials</strong></span>
            </div>
            <div style="margin-left:5%">
               <?php
			   	 $sqlUploadedDoc = mysql_query("SELECT STC.*,SU.first_name FROM software_teacher_doc  AS STC 
 										INNER JOIN software_user as SU ON STC.teacher_id = SU.id");
				 while($resUploadedDoc  = mysql_fetch_array($sqlUploadedDoc)){
				?>
            <div class="text1" style=" margin-top:10px; border:1px solid  #0D8FB3"  align="left" >
            	<div  style=" padding:10px; font-family:Arial, Helvetica, sans-serif; background:#1FA6CC; color:#FFF;padding-left:10px; max-height:25px !important "  >	
                    <div style="float:left; width:30%" class="text" >Document Date:</div>
                    <div style="float:left; width:50%" ><?=date("Y-m-d H:i:s",$resUploadedDoc['date'])?>  </div>
                    <div style=" clear:both" ></div>
                </div>
         		  <div  style=" padding-top:18px;padding-left:10px; max-height:25px !important" >	
                    <div style="float:left; width:30%" >Document Title:</div>
                    <div style="float:left; width:60%" ><?=$resUploadedDoc['title']?>  <span style=" font-size:10px; font-style:italic">&nbsp; Uploaded by </span> <?=$resUploadedDoc['first_name']?></div>
      
                    <div style=" clear:both" ></div>
                </div>
                 <div style=" padding-top:10px;padding-left:10px; max-height:25px !important" >	
                    <div style="float:left; width:30%" >Documents:</div>
                    <div style="float:left; width:50%" ><a href="upload_images/<?=$resUploadedDoc['documents']?>" style=" text-decoration:none"><?=$resUploadedDoc['documents']?></a></div>
                    <div style=" clear:both" ></div>
                </div>
         
             </div>
             <?php
				  }
			 ?>
            </div> 
        </div>
        <div style="clear:both"></div>
    </div>
    
    <div style="margin-top:23px; margin-bottom:21px" align="center" >
    	<?php
									$sqlAdvertise = mysql_query("SELECT * FROM software_advertise 
																	WHERE 
																		banner_status = 'Y' AND banner = 2
																		ORDER BY RAND()
																		");
									$resAdvertise = mysql_fetch_array($sqlAdvertise);
							
									$imgPath  = 'admin/upload_images/'.$resAdvertise["banner_image"];
									
								?>
								
    </div>
   </div>
   <div id="footer">
  		<?php include("includes/footer.php")?>
   </div>
</div>
	</div>
</center>
</body>
</html>

